#!/bin/zsh
RESOURCES="$(cd "$(dirname "$0")/../Resources" && pwd)"
# Terminal belongs to the user who clicked the app. It keeps progress and
# failures visible even on Macs without Tk; background startup runs server.py.
if ! /usr/bin/open -a Terminal "$RESOURCES/start-agent.command"; then
  /usr/bin/osascript -e 'display alert "Live Director" message "Could not open the launcher. Open START AGENT.command in Terminal. Manual connection: http://127.0.0.1:17836/setup" as critical'
  exit 1
fi
